<#import "/ftl/mainAdmin.ftl" as page>

<@page.mainTemplate styleSheet="menuListCss" jsFile="menuListJs" current="模块信息">
    <div class="page-content">
        <!-- BEGIN PAGE HEAD-->
        <div class="page-head">
            <!-- BEGIN PAGE TITLE -->
                <div class="page-title">
                    <h1><#if functionVO.id??>修改模块<#else>新增模块</#if>
                        <small><#if functionVO.id??>修改模块页面<#else>新增模块页面</#if></small>
                    </h1>
                </div>
            <!-- END PAGE TITLE -->
        </div>
        <!-- END PAGE HEAD -->
        <!-- BEGIN PAGE BREADCRUMB -->
        <ul class="page-breadcrumb breadcrumb">
            <li>
                <a href="${context}/base/index_ftl">首页</a>
                <i class="fa fa-circle"></i>
            </li>
            <li>
                <span class="active"><#if functionVO.id??>修改模块信息<#else>新增模块信息</#if></span>
            </li>
        </ul>
        <!-- END PAGE BREADCRUMB -->
        <!-- BEGIN PAGE BASE CONTENT -->
        <div class="portlet light bordered">
            <div class="portlet-body form">
                <form class="createform" role="form" action="javascript:;" method="POST" id="addMenuForm">
                    <input type="hidden" name="id" value="${functionVO.id}" />
                    <div class="form-body">
                        <div class="alert alert-danger display-hide">
                            <button class="close" data-close="alert"></button> 表单含有错误. 请检查. 
                        </div>
                        <div class="alert alert-success display-hide">
                            <button class="close" data-close="alert"></button> 表单验证通过! 
                        </div>
                        <div class="row">
                            <div class="col-md-6">
		                        <div class="form-group">
				                    <div class="input-group">
				                        <label class="input-group-addon">系统</label>
				                        <div class="input-group-content">
				                            <select name="system_code" class="form-control input-inline">
				                               <option value="">★请选择</option>
				                               <option value="USER_CENTER" <#if functionVO.system_code=="USER_CENTER">selected</#if> >后台管理</option>
				                               <option value="COMPANY" <#if functionVO.system_code=="COMPANY">selected</#if> >企业应用</option>
				                            </select>
				                        </div>
				                    </div>
				                </div>
				            </div>
				            <div class="col-md-6">
				                <div class="form-group">
				                    <div class="input-group">
				                        <label class="input-group-addon">模块编码</label>
				                        <div class="input-group-content">
				                            <input type="text" id="function_code" name="function_code" class="form-control" 
				                            placeholder="★请输入模块编码（全功能唯一）" value="${functionVO.function_code}" />
				                        </div>
				                    </div>
				                </div>
				            </div>
				        </div>
				        <div class="row">
				        	<div class="col-md-6">
				                <div class="form-group">
				                    <div class="input-group">
				                        <label class="input-group-addon">模块名称</label>
				                        <div class="input-group-content">
				                            <input type="text" id="function_name" name="function_name" 
				                            class="form-control" placeholder="★请输入模块名称（全模块唯一）" value="${functionVO.function_name}" />
				                        </div>
				                    </div>
				                </div>
				            </div>
				           <div class="col-md-6">
				        		<div class="form-group">
				                    <div class="input-group">
				                        <label class="input-group-addon">模块链接</label>
				                        <div class="input-group-content">
				                            <input type="text" id="function_address" name="function_address" <#if functionVO.id!="">disabled</#if> class="form-control" 
				                            placeholder="★请输入模块链接url, 例: /base/indexData" value="${functionVO.function_address}" />
				                        </div>
				                    </div>
				                </div>
				            </div>
				        </div>
				        <div class="row">
				             <div class="col-md-6">
				                <div class="form-group">
				                    <div class="input-group">
				                        <label class="input-group-addon">数据获取地址</label>
				                        <div class="input-group-content">
				                            <input type="text" id="function_url" name="function_url" <#if functionVO.id!="">disabled</#if> class="form-control" 
				                            placeholder="★请输入权限地址url, 例: /userManage/user" value="${functionVO.function_url}" />
				                        </div>
				                    </div>
				                </div>
				            </div>
				            <div class="col-md-6">
				                <div class="form-group">
				                    <div class="input-group">
				                        <label class="input-group-addon">上级功能</label>
				                        <div class="input-group-content">
				                            <select name="pid" class="form-control input-inline">
				                            <option value="" >★请选择</option>
				                             <#list functionList as function>
				                               <option value="${function.id}" <#if functionVO.pid==function.id>selected</#if> > ${function.function_name}</option>
				                             </#list>
				                            </select>
				                        </div>
				                    </div>
				                </div>
				            </div>
				        </div>
				        <div class="row">
				        	<div class="col-md-6">
				                <div class="form-group">
				                    <div class="input-group">
				                        <label class="input-group-addon">状态</label>
				                        <div class="input-group-content">
				                            <select name="data_status" class="form-control input-inline">
				                                <option value="DATA_AVAILABLE" <#if functionVO.data_status=="DATA_AVAILABLE" >selected</#if> >启用</option>
				                                <option value="DATA_DISABLE" <#if functionVO.data_status=="DATA_DISABLE" >selected</#if> >停用</option>
				                            </select>
				                        </div>
				                    </div>
				                </div>
				            </div>
				            <div class="col-md-6">
				                <div class="form-group">
				                    <div class="input-group">
				                        <label class="input-group-addon">功能描述</label>
				                        <div class="input-group-content">
				                            <input type="text" id="remark" name="remark" class="form-control" placeholder="" 
				                            value="${functionVO.remark}" />
				                        </div>
				                    </div>
				                </div>
				            </div>
				        </div>
				        <div class="row">
				        	<div class="col-md-6">
				                <div class="form-group">
				                    <div class="input-group">
				                        <label class="input-group-addon">排序号</label>
				                        <div class="input-group-content">
				                             <input type="text" id="sno" name="sno" class="form-control" placeholder="排序号" 
				                            value="${functionVO.sno}" />
				                        </div>
				                    </div>
				                </div>
				            </div>				           
				        </div>
		                <div class="form-actions top">
		                    <div class="row col-md-4 col-xs-4 col-md-offset-5">
		                        <button type="submit" id="btnSubmit" class="btn green">保存</button>
                                <a href="${context}/function_info/function_list_view" class="btn default">返回</a>
		                    </div>
		                </div>
		            </div>
                </form>
            </div>
        </div>
        <!-- END PAGE BASE CONTENT -->
    </div>
</@page.mainTemplate>